﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Signup.aspx.cs" Inherits="TravelManagement.WebForm2" %>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Table runat="server" Width="540px" Height="115px" Caption="Sign Up for Your New Account">
        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="lbl1" runat="server">Enter User Name</asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
            </asp:TableCell>
            <asp:TableCell>
                <asp:RequiredFieldValidator 
                    ID="txtUserNameValidator" 
                    runat="server" 
                    ErrorMessage="Please enter a user name"
                    ControlToValidate="txtUserName"
                    ForeColor="Red"
                    >
                </asp:RequiredFieldValidator>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="lbl2" runat="server">Enter Password</asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
            </asp:TableCell>
            <asp:TableCell>
                <asp:RequiredFieldValidator
                        ID="txtPasswordValidator"
                        runat="server"
                        ErrorMessage="Please enter a password"
                        ControlToValidate = "txtPassword"
                        ForeColor="Red"
                        >
                        </asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator 
                        ID="txtPasswordRegexValidator"
                        runat="server"
                        ErrorMessage = "Password does not meet security requirements"
                        ControlToValidate = "txtPassword"
                        ForeColor = "Red"
                        ValidationExpression="^(?=.*\d)(?=.*[a-zA-Z]).{8,20}$"
                        >
                </asp:RegularExpressionValidator>
            </asp:TableCell>
        </asp:TableRow>
        <asp:TableRow>
            <asp:TableCell>
                <asp:Label ID="lbl3" runat="server">Confirm Password</asp:Label>
            </asp:TableCell>
            <asp:TableCell>
                <asp:TextBox ID="txtConfirm" runat="server" TextMode="Password"></asp:TextBox>
            </asp:TableCell>
            <asp:TableCell>
                <asp:CompareValidator
                    ID="txtConfirmValidator"
                    runat="server"
                    ErrorMessage="Password and Confirm Password must match"
                    ControlToValidate="txtConfirm"
                    ControlToCompare="txtPassword"
                    ForeColor="Red"
                    ></asp:CompareValidator>
                
            </asp:TableCell>
        </asp:TableRow>
        
        <asp:TableRow>
            <asp:TableCell><asp:Label runat="server"></asp:Label> </asp:TableCell>
            <asp:TableCell>
                <asp:Button ID="btnSignup" runat="server" OnClick="btnSignup_Click" Text="SUBMIT" />
            </asp:TableCell>
            <asp:TableCell>
                <asp:Label ID="lblUserNameExists" runat="server" Text="User name already exists" ForeColor="Red" Visible="false"></asp:Label>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
</asp:Content>
